public class method6 {
    //判断一个数在数组中是否存在
    public static void main(String[] args) {
        int[]arr={1,8946,51,351,2,9,6,4,68,15,3,3,1,5,4,48};
        boolean flag=        getone(arr,889);
        System.out.println(flag);
    }
    public static boolean getone(int []arr,int x){
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] == x) {
                return true;
            }
        }
        return false;
    }
}
